home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / pctjoc85.arc / GRAFCHAR.PAS < prev    next >
Pascal/Delphi Source File  |  1985-08-26  |  1KB  |  39 lines

  1. program Grafchar;
  2. const
  3.                                        { 76543210 }
  4.   BOX: array[0..7] of byte = ($FF,     { 11111111 }
  5.                               $81,     { 1      1 }
  6.                               $81,     { 1      1 }
  7.                               $81,     { 1      1 }
  8.                               $81,     { 1      1 }
  9.                               $81,     { 1      1 }
  10.                               $81,     { 1      1 }
  11.                               $FF);    { 11111111 }
  12.  
  13.   BOX_byte: byte = $80;                {BOX byte value}
  14. var
  15.   BOX_char: char absolute BOX_byte;
  16.   EXT_PTR_ofs: integer absolute $0000:$007C;
  17.   EXT_PTR_seg: integer absolute $0000:$007E;
  18.  
  19. begin
  20.   graphcolormode; palette(1);  {color; cyan-magenta-white}
  21.   textcolor(1);                {cyan}
  22.   gotoxy(1,2);
  23.   writeln('Before EXT_PTR points to graphics table');
  24.   gotoxy(1,4);
  25.   writeln('Character value = ',Box_byte,' Graphic = ',BOX_char);
  26.  
  27.   EXT_PTR_ofs:=ofs(BOX);       {graphic table offset}
  28.   EXT_PTR_seg:=seg(BOX);       {graphic table segment address}
  29.  
  30.   textcolor(2);                {magenta}
  31.   gotoxy(1,8);
  32.   writeln('After EXT_PTR points to graphics table');
  33.   gotoxy(1,10);
  34.   writeln('Character value = ',Box_byte,' Graphic = ',BOX_char);
  35.   writeln; write('>>Press Enter: ');
  36.   readln;
  37.   textmode
  38. end.
  39.